'''
Created on 22 janv. 2013

@author: tclain
'''

class ParsingError(Exception):
    '''
    Class extending exception used to represents the errors occuring int file processing. 
    '''
    def __init__(self,value):
        self.exceptionMessage = value
    def __str__(self):
        return self.getStrMeaning()
    def getStrMeaning(self):
        if self.value == "FileCantBeOpened":
            return "The file can't be opened. Please check the permissions."
        else :
            return "Error"
        
class VariableError(Exception):
    '''
    Class used to signify the error in variable format
    '''
    def __init__(self,value):
        '''
        Constructor of the exception
        '''
        self.value = value
    def __str__(self):
        '''
        Returns a string-representation of the Exception 
        '''
        return self.value
    
class ContainerError(Exception):
    def __init__(self,value):
        '''
        Constructor of the exception Container 
        '''
        self.value = value
    def __str__(self):
        '''
        Returns a string-representation of the Exception 
        '''
        return self.value